﻿Imports System
Imports System.Drawing
Imports System.Resources

Namespace System.Workflow.Activities
    Friend Class DR
        ' Methods
        Friend Shared Function GetImage(ByVal resID As String) As Image
            Dim image As Image = [TryCast](DR.resourceManager.GetObject(resID),Image)
            Dim bitmap As Bitmap = [TryCast](image,Bitmap)
            If (Not bitmap Is Nothing) Then
                bitmap.MakeTransparent(DR.TransparentColor)
            End If
            Return image
        End Function

        Friend Shared Function GetString(ByVal resID As String) As String
            Return DR.resourceManager.GetString(resID)
        End Function


        ' Fields
        Friend Const AddEventDriven As String = "AddEventDriven"
        Friend Const AddingChild As String = "AddingChild"
        Friend Const AddNewEvent As String = "AddNewEvent"
        Friend Const AddNewEventDesc As String = "AddNewEventDesc"
        Friend Const AddState As String = "AddState"
        Friend Const AddStateFinalization As String = "AddStateFinalization"
        Friend Const AddStateInitialization As String = "AddStateInitialization"
        Friend Const BringToFront As String = "BringToFront"
        Friend Const Compensation As String = "Compensation"
        Friend Const CompensationView As String = "CompensationView"
        Friend Const CompletedState As String = "CompletedState"
        Friend Const Delete As String = "Delete"
        Friend Const DeleteEvent As String = "DeleteEvent"
        Friend Const DeleteEventDesc As String = "DeleteEventDesc"
        Friend Const DropActivityHere As String = "DropActivityHere"
        Friend Const DropEventsHere As String = "DropEventsHere"
        Friend Const Error_InvalidImageResource As String = "Error_InvalidImageResource"
        Friend Const [Event] As String = "Event"
        Friend Const EventBasedWorkFlow As String = "EventBasedWorkFlow"
        Friend Const EventsDesc As String = "EventsDesc"
        Friend Const EventsView As String = "EventsView"
        Friend Const Exception As String = "Exception"
        Friend Const ExceptionsView As String = "ExceptionsView"
        Friend Const ImageFileFilter As String = "ImageFileFilter"
        Friend Const InitialState As String = "InitialState"
        Friend Const InvokeWebServiceDisplayName As String = "InvokeWebServiceDisplayName"
        Friend Const MoveLeftDesc As String = "MoveLeftDesc"
        Friend Const MoveRightDesc As String = "MoveRightDesc"
        Friend Const NavigateEvent As String = "NavigateEvent"
        Friend Const NavigateToEvent As String = "NavigateToEvent"
        Friend Const NavigateToEventDesc As String = "NavigateToEventDesc"
        Friend Const NewEvent As String = "NewEvent"
        Friend Const NextEvent As String = "NextEvent"
        Friend Const PreviousEvent As String = "PreviousEvent"
        Private Shared resourceManager As ResourceManager = New ResourceManager("System.Workflow.Activities.ActivityDesignerResources", Assembly.GetExecutingAssembly)
        Friend Const ResourceSet As String = "System.Workflow.Activities.ActivityDesignerResources"
        Friend Const ScopeDesc As String = "ScopeDesc"
        Friend Const SendToBack As String = "SendToBack"
        Friend Const SequenceArrow As String = "SequenceArrow"
        Friend Const SequentialWorkflowHelpText As String = "SequentialWorkflowHelpText"
        Friend Const SetAsCompletedState As String = "SetAsCompletedState"
        Friend Const SetAsInitialState As String = "SetAsInitialState"
        Friend Const StartSequentialWorkflow As String = "StartSequentialWorkflow"
        Friend Const StateHelpText As String = "StateHelpText"
        Friend Const StateMachineView As String = "StateMachineView"
        Friend Const StateMachineWorkflowHelpText As String = "StateMachineWorkflowHelpText"
        Friend Const ThemePropertyReadOnly As String = "ThemePropertyReadOnly"
        Friend Shared TransparentColor As Color = Color.FromArgb(&HFF, 0, &HFF)
        Friend Const View As String = "View"
        Friend Const ViewNextEvent As String = "ViewNextEvent"
        Friend Const ViewNextEventDesc As String = "ViewNextEventDesc"
        Friend Const ViewPreviousEvent As String = "ViewPreviousEvent"
        Friend Const ViewPreviousEventDesc As String = "ViewPreviousEventDesc"
        Friend Const WebServiceFaultDisplayName As String = "WebServiceFaultDisplayName"
        Friend Const WebServiceReceiveDisplayName As String = "WebServiceReceiveDisplayName"
        Friend Const WebServiceResponseDisplayName As String = "WebServiceResponseDisplayName"
        Friend Const WorkflowCancellation As String = "WorkflowCancellation"
        Friend Const WorkflowCompensation As String = "WorkflowCompensation"
        Friend Const WorkflowEvents As String = "WorkflowEvents"
        Friend Const WorkflowExceptions As String = "WorkflowExceptions"
        Friend Const WorkflowView As String = "WorkflowView"
    End Class
End Namespace

